import request from "@/utils/request";
/**
 * 字典表列表
 * @param {*} data
 * @returns
 */
export function API_dictList(params) {
  return request({
    url: "/dict/list",
    method: "get",
    params,
  });
}

/**
 * 字典表新增
 * @returns
 */
export function API_dictCreate(data) {
  return request({
    url: "/dict/create",
    method: "post",
    data,
  });
}

/**
 * 字典表修改
 * @returns
 */
export function API_dictEdit(data) {
  return request({
    url: `/dict/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 字典表删除
 * @returns
 */
export function API_dictDelete(data) {
  return request({
    url: `/dict/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 字典表记录
 * @returns
 */
export function API_dictGet(params) {
  return request({
    url: "/dict/get",
    method: "get",
    params,
  });
}
